<template>
    <div>
        <el-card>
        <div slot="header" class="clearfix">
            <h4>新增接口文档</h4>
        </div>
        <el-tabs type="border-card">
            <el-tab-pane label="基本信息">
                <el-form :model="addForm" label-width="120px">
                  <el-form-item label="服务名称" required>
                      <el-input v-model="addForm.name" placeholder="请输入服务名称"></el-input>
                  </el-form-item>
                  <el-form-item label="描述">
                      <el-input v-model="addForm.name" placeholder="请输入描述" type="textarea" :rows="3"></el-input>
                  </el-form-item>
                  <el-form-item label="版本" prop="version" required>
                      <el-input v-model="addForm.version" placeholder="请输入版本"></el-input>
                  </el-form-item>
                  <el-form-item label="认证信息">
                      <el-input v-model="addForm.name" placeholder="请输入认证信息"></el-input>
                  </el-form-item>
                  <el-form-item label="环境信息" required>
                      <el-input v-model="addForm.name" placeholder="请输入环境信息"></el-input>
                  </el-form-item>
                  <el-form-item label="文档来源" required>
                      <el-radio-group v-model="radio">
                        <el-radio :label="3">服务</el-radio>
                        <el-radio :label="6">API</el-radio>
                        <el-radio :label="9">LOCAL</el-radio>
                      </el-radio-group>
                  </el-form-item>
                  <el-form-item label="服务">
                      <el-row :gutter="10">
                        <el-col :span="4">
                            <el-select v-model="addForm.service" placeholder="请选择注册中心" size="small">
                              <el-option :label="1" :value="2"></el-option>
                            </el-select>
                        </el-col>
                         <el-col :span="4">
                            <el-select v-model="addForm.service" placeholder="请选择服务名" size="small">
                              <el-option :label="1" :value="2"></el-option>
                            </el-select>
                        </el-col>
                        <el-col :span="10">
                           <el-input v-model="addForm.name" placeholder="服务文档请求路径" size="small"></el-input>
                        </el-col>
                        <el-col :span="2">
                            <el-button type="primary" size="small">获取</el-button>
                        </el-col>
                      </el-row>
                  </el-form-item>
                  <el-form-item label="OpenAPI接口地址">
                      <el-row>
                        <el-col :span="10">
                            <el-input v-model="addForm.name" placeholder="请输入OpenAPI接口地址"></el-input>
                        </el-col>
                      </el-row>
                  </el-form-item>
                </el-form>
            </el-tab-pane>
            <el-tab-pane label="接口信息">接口信息</el-tab-pane>
        </el-tabs>
        </el-card>
        <div style="text-align: right;margin-top: 10px;">
            <el-button type="primary" @click="submit" size="small">保存</el-button>
            <el-button @click="drawerVisible = false" size="small">取消</el-button>
        </div>
    </div>
    
</template>

<script>
    export default {
        data() {
            return {
                addForm: {}
            }
        }
    }
</script>

<style lang="scss" scoped>

</style>